package com.edu.buservice.biz.shared.impl;

import com.edu.buservice.biz.UserManger;
import com.edu.buservice.facade.facade.UserFacade;
import com.edu.buservice.facade.model.response.BaseUserInfoDTO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: KQAIA
 * @description:
 * @author: 无恙
 * @create: 2025-04-07 21:09
 **/

@Service
@DubboService(interfaceClass = UserFacade.class)
public class UserFacadeImpl implements UserFacade {

	@Autowired
	private UserManger userManger;

	@Override
	public List<BaseUserInfoDTO> queryUserByIds(List<String> userIds) {

		if (userIds == null || userIds.isEmpty()){
			return List.of();
		}

		return userManger.queryUserByIds(userIds);
	}
}
